import request from '@/utils/request'

const comparisondApi = {
  postFiles: '/api/datacompare/PostFiles',
  beginExport: '/api/datacompare/beginExport',
  exportDataList: '/api/datacompare/ExportDataList',
  getHousesNew: '/api/OAB_SysObject/getHousesNew',
  getMZHHSJnew: '/api/OAB_SysObject/getMZHHSJnew',
  getMarriagenew: '/api/OAB_SysObject/getMarriagenew',
  getHousesBA: '/api/OAB_SysObject//getHousesBA',
  getHousesXSBA: '/api/OAB_SysObject/getHousesXSBA'
}

export function postFiles (data, onProgress) {
  return request({
    url: comparisondApi.postFiles,
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

export function beginExport (params) {
  return request({
    url: comparisondApi.beginExport,
    method: 'get',
    params
  })
}

export function exportDataList (params) {
  return request({
    url: comparisondApi.exportDataList,
    method: 'get',
    params
  })
}

export function getHousesNew (params) {
  return request({
    url: comparisondApi.getHousesNew,
    method: 'get',
    params,
    customCode: true
  })
}
export function getMZHHSJnew (params) {
  return request({
    url: comparisondApi.getMZHHSJnew,
    method: 'get',
    params,
    customCode: true
  })
}
export function getMarriagenew (params) {
  return request({
    url: comparisondApi.getMarriagenew,
    method: 'get',
    params,
    customCode: true
  })
}
export function getHousesBA (params) {
  return request({
    url: comparisondApi.getHousesBA,
    method: 'get',
    params,
    customCode: true
  })
}
export function getHousesXSBA (params) {
  return request({
    url: comparisondApi.getHousesXSBA,
    method: 'get',
    params,
    customCode: true
  })
}
